package org.electric.util;



import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.codehaus.jackson.map.ObjectMapper;



public class WriterUtil {
	public static ObjectMapper ominstance = null;
	
	public static ObjectMapper writeTopage() throws IOException{
		 if (ominstance == null) {
	            ominstance = new ObjectMapper();
	            ominstance.configure(org.codehaus.jackson.JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
	            ominstance.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
	       }
	        return ominstance;
	}
}
